package com.example.myanimator.mcanvas;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

import com.example.myanimator.R;

/**
 * @author tgw
 * @date 2021/3/29
 * @describe 混合模式之 AvoidXfermode  能够将两张图片进行无缝衔接
 */
public class CanvasLearningActivity extends AppCompatActivity {

    private Button btStart;
    private ImageView imageView;
    private Bitmap bitmap;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_canvas);
        imageView = findViewById(R.id.iv_drawable);
        bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.aa);
        RoundImgDrawable roundImgDrawable = new RoundImgDrawable(bitmap);
        imageView.setImageDrawable(roundImgDrawable);

        findViewById(R.id.bt_start).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {


            }
        });
    }
}